var net = require('net');
var serverPool = [
		'10.125.16.173','10.125.16.172'
];
var port = 81;

for(var i = 0; i < serverPool.length; i++){
	purge(serverPool[i])
}

function purge(server){
	var client = net.connect(port, server, function(){
	    client.write('PURGE /HTTP/1.1\r\n');
	    client.write('Host:detail.daily.tmall.net\r\n');
	    client.write('Purge-Regex:/item.*\r\n');
	    client.write('Purge-Type:REGEX\r\n');
	    client.write('\r\n');
	    client.on('data', function(data){
	        console.log(data.toString());
	    });
	    client.on('end', function(){
	        console.log('client disconnected');
	    });
	});
}
